/**
 * Created by CodeTlan.
 * User: Ing. Miguel Salas
 * Date: 3/24/12
 * Time: 7:28 PM
 */
Ext.define("CT.view.permiso.View",{
    extend:'Ext.view.View',
    alias:'widget.viewpermisos',
    store:'Permisos',
    style:{
        backgroundColor:'#FFFFFF'
    },
    initComponent:function () {
        var imageTpl = new Ext.XTemplate(
            '   <ul style="text-align:center;">',
            '       <tpl for=".">',
            '           <li id="menu-{modulo_k}" style="cursor: pointer; display:inline-block; padding:5px; ',
            '           <tpl if="!values.permiso">',
            '               opacity:0.2; ',
            '           </tpl>',
            '           " class="select-me">',
            '               <img src="{img_big}" /><br><span style="color:#000000;">{titulo}</span>',
            '           </li>',
            '       </tpl>',
            '   </ul>'
        );
        Ext.apply(this, {
            tpl: imageTpl,
            itemSelector: 'li.select-me'
        });
        this.callParent(arguments);

        this.store.setParams({rol_k:this.rol_k},true);

    }
});